<div class="loader"></div>

<table class="table table-bordered table-striped table-hover">
	<tr>
		<td></td>
		<td>{{ $list_item_id }}</td>
		<td>{{ $list_product_id }}</td>
		<td>{{ $list_product_name }}</td>
		<td>{{ $list_product_model }}</td>
		<td>{{ $list_product_sku }}</td>
		<td>{{ $list_product_quantity }}</td>
		<td>{{ $list_product_srp }}</td>
		<td>{{ $list_product_transfer_price }}</td>
	</tr>
	@foreach ( $result->purchaseOrderProducts as $po_items )
		<tr>
			<td>{{ ($result->status == Constant::PO_PENDING) ? Form::checkbox('purchase_order_product[' . $po_items->PURCHASE_ORDER_id . '][]', $po_items->id, null, [ 'class' => 'form-control po-product' ]) : ''}}</td>
			<td>{{ $po_items->ORDER_PRODUCT_id }}</td>
			<td>{{ $po_items->orderProduct->PRODUCT_id }}</td>
			<td>{{ $po_items->orderProduct->product->name }}</td>
			<td>{{ $po_items->orderProduct->product->code }}</td>
			<td>{{ $po_items->orderProduct->product->sku }}</td>
			<td>{{ $po_items->quantity }}</td>
			<td>{{ number_format($po_items->srp, 2) }}</td>
			<td>{{ number_format($po_items->transfer_price,2) }}</td>
		</tr>
	@endforeach
</tr>
</table>
@if($result->status == Constant::PO_APPROVED)
	<a href='' class="btn btn-success">Generate Sticker</a>
@endif
<a href='{{ URL::to("po/export/{$result->id}/default/1") }}' class="btn btn-primary">Download PO</a>
{{ HTML::link( URL::previous(), $text_close, array('class' => 'btn btn-default', 'id'=> 'cancel')) }}
